package com.sky.yipinyoufujava.mapper;


import com.sky.yipinyoufujava.pojo.from.GetSingleOrderGoodsFrom;
import com.sky.yipinyoufujava.pojo.order.OrderAddress;
import com.sky.yipinyoufujava.pojo.UserAddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AddressMapper {

    @Select("SELECT * FROM UserAddress WHERE userId = #{userId}")
    List<UserAddress> getUserAddress(String userId);


    @Select("SELECT * FROM OrderAddress WHERE orderId = #{orderId};")
    OrderAddress getOrderAddress(GetSingleOrderGoodsFrom orderId);
}
